<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Cart extends CI_Controller {
	public function index()
	{	
		$data['tag'] = date('Ymd');
		$data['ser'] = 'http://'.$_SERVER['SERVER_NAME'];
		$data['cart_count'] = 1;
		$data['is_login'] = TRUE;
		$data['logoName'] = 'Super3D';
		$data['targetUrl'] = $data['ser'] . $_SERVER['REQUEST_URI'];
		$data['username'] = 'Stony';
		$data['uid'] = '1000001';
		$this->load->view('cart',$data);
	}
	public function confirm(){
		$data['tag'] = date('Ymd');
		$data['ser'] = 'http://'.$_SERVER['SERVER_NAME'];
		$data['cart_count'] = 1;
		$data['is_login'] = TRUE;
		$data['logoName'] = 'Super3D';
		$data['targetUrl'] = $data['ser'] . $_SERVER['REQUEST_URI'];
		$data['username'] = 'Stony';
		$data['uid'] = '1000001';
		$sql = "select m.id, u.uid,u.name as uname,p.name as pname,c.name as cname,d.name as dname,m.area,m.zip_code,m.mobile from user_maker_address m, user u, province p, city c, dist d
				where m.uid = u.uid and m.prov_id = p.id and m.city_id = c.id and m.dist_id = d.id
				and m.uid = " . 1000001;
		$query = $this->db->query($sql);
		$data['address'] = $query->result();
		$this->load->view('cart_confirm',$data);
	}
	public function login(){
		$data['tag'] = date('Ymd');
		$data['ser'] = 'http://'.$_SERVER['SERVER_NAME'];
		$data['cart_count'] = 1;
		$data['is_login'] = TRUE;
		$data['logoName'] = 'Super3D';
		$data['targetUrl'] = $data['ser'] . $_SERVER['REQUEST_URI'];
		$data['username'] = 'Stony';
		$data['uid'] = '1000001';
		$this->load->view('cart_login',$data);
	}
}